package excel.server.main;

import excel.server.ExcelServer;
import org.apache.poi.util.DefaultTempFileCreationStrategy;
import org.apache.poi.util.TempFile;

import java.io.File;

public class Main {

    public static void main(String[] args) {
        Config config = Config.getConfig();
        if (config.getTempDir() == null || config.getTempDir().trim().equals("")) {
        } else {
            // 设置临时文件的地址
            TempFile.setTempFileCreationStrategy(new DefaultTempFileCreationStrategy(new File(config.getTempDir().trim())));
        }
        new ExcelServer(config.getPort(), config.getPoolSize()).start();
    }

}
